ARM Cortex-M

The ARM Cortex-M is a group of 32-bit RISC ARM processor cores licensed by ARM Holdings. The cores are intended for microcontroller applications, and consists of the Cortex-M0, Cortex-M1, Cortex-M3, Cortex-M4.[1][2][3][4]

Contents

Overview

ARM license

ARM Holdings does not manufacture and sell CPU devices based on its own designs, but rather, licenses the processor architecture to interested parties. ARM offers a variety of licensing terms, varying in cost and deliverables. To all licensees, ARM provides an integratable hardware description of the ARM core, as well as complete software development toolset, and the right to sell manufactured silicon containing the ARM CPU.

Silicon customization

Integrated device manufacturers (IDM) receives the ARM Processor IP as synthesizable RTL (written in Verilog). In this form, they have the ability to perform architectural level optimizations and extensions. This allows the manufacturer to achieve custom design goals, such as higher clock speed, very low power consumption, instruction set extensions, optimizations for size, debug support, etc.

ARM Cortex-M Optional Features[5][6][1][2][3][4]
ARM
Cortex-M
SysTick
Timer
Bit
Banding
Memory Protection
Unit (MPU)
Cortex-M0
Optional
No No
Cortex-M1
Optional
No No
Cortex-M3
Yes
Optional
Optional
Cortex-M4
Yes
Optional
Optional

Note: Most Cortex-M3 and M4 chips have Bit-Banding and MPU, but software should validate existance before attempting to use.[7]

Instruction set

The Cortex-M0 and M1 are based upon the ARMv6-M architecture,[5] the Cortex-M3 is based upon the ARMv7-M architecture,[6] and the Cortex-M4 is based upon the ARMv7-ME architecture.[6] The architectures are binary instruction upward compatible from ARMv6-M to ARMv7-M to ARMv7-ME. Binary instructions available for the Cortex-M0 and M1 can execute without modification on the Cortex-M3 and Cortex-M4. Binary instructions available for the Cortex-M3 can execute without modification on the Cortex-M4.[5][6]

All four Cortex-M cores implement a common instruction subset that consists of: Thumb subset, Thumb-2 subset, multiply. The Cortex-M0 and M1 include all older Thumb instructions, except new instructions (CBZ, CBNZ, IT) which were added in ARMv7-M architecture. The Cortex-M0 and M1 include a minor subset of Thumb-2 instructions (BL, DMB, DSB, ISB, MRS, MSR).[5][6]

The Cortex-M0 and M1 were designed to be the smallest size possible, thus have the least instructions of the Cortex-M family. The Cortex-M3 adds a 3 Thumb instructions and all Thumb-2 instructions plus a 10-12 cycle hardware divide and saturated math instructions. The Cortex-M4 then adds DSP instructions and optional single-precision floating point unit.[5][6] If the Cortex-M4 has the floating point unit it is known as the Cortex-M4F.

ARM Cortex-M Instruction Sets[5][6][1][2][3][4]
ARM
Cortex-M
Thumb Thumb-2 Hardware
Multiply
Hardware
Divide
Saturated
Math
DSP
Extensions
Floating
Point
ARM
Architecture
Cortex-M0
Most
Subset
1 or 32 cycle
No No No No
ARMv6-M [5]
Cortex-M1
Most
Subset
3 or 33 cycle
No No No No
ARMv6-M [5]
Cortex-M3
Entire Entire 1 cycle Yes Yes No No
ARMv7-M [6]
Cortex-M4
Entire Entire 1 cycle Yes Yes Yes
Optional
ARMv7-ME [6]

Note: The Cortex-M0 and M1 doesn't include these Thumb instructions: CBZ, CBNZ, IT.[5][6]
Note: The Cortex-M0 and M1 only include these Thumb-2 instructions: BL, DMB, DSB, ISB, MRS, MSR.[5][6]

Cortex-M0

Features

Key features of the Cortex-M0 core are:[1]

Implementations

The following IC chips vendors have developed microcontrollers based on the Cortex-M0 core:

Cortex-M1

Features

Key features of the Cortex-M1 core are:[2]

Implementations

The following FPGAs vendors support the Cortex-M1 as soft-cores:

Cortex-M3

Features

Key features of the Cortex-M3 core are:[8][3]

Implementations

The following IC chips vendors have developed microcontrollers based on the Cortex-M3 core:

Cortex-M4

Features

Conceptually the Cortex-M4 is a Cortex-M3 plus DSP Instructions, and optional Floating Point Unit. If the core contains the floating-point unit, it is known as the Cortex-M4F, otherwise it is Cortex-M4. Key features of the Cortex-M4 core are:[4]

Implementations

The following IC chips vendors have developed microcontrollers based on the Cortex-M4 core:

Development tools

Development toolchains
Free C software libraries
Real-Time Operating Systems (RTOS)
Debugging tools (JTAG / SWD)
Non-C/C++ Computer Languages

Documentation

The amount of documentation for all ARM chips is daunting, especially for newcomers. The documentation for microcontrollers from past decades would easily be inclusive in a single document, but as chips have evolved so has the documentation grown. The total documentation is especially hard to grasp for all ARM chips since it consists of documents from the IC manufacturer and documents from CPU core vendor (ARM Holdings).

A typical top-down documentation tree is: high-level marketing slides, datasheet for the exact physical chip, a detailed reference manual that describes common peripherals and other aspects of physical chips within the same series, reference manual for the exact ARM core processor within the chip, reference manual for the ARM architecture of the core which includes detailed description of all instruction sets.

Documentation Tree (top to bottom)
  1. IC Manufacturer Marketing Slides.
  2. IC Manufacturer Datasheets.
  3. IC Manufacturer Reference Manuals.
  4. ARM Core Reference Manuals.[1][2][3][4]
  5. ARM Architecture Reference Manuals.[5][6]

IC Manufacturers usually have additional documents, including: evaluation board user manuals, application notes, getting started with development software, software library documents, errata, and more.

See also

Computer science portal
Electronics portal

References

Further reading

External links

Official
Cortex-M
Series
ARM
Website
ARM
Core
ARM
Architecture
M0
M0
M0 r0p0
ARMv6-M
M1
M1
M1 r1p0
ARMv6-M
M3
M3
M3 r2p0
M3 r1p1
Errata
ARMv7-M
M4
M4
M4F r0p1
Errata
ARMv7-ME
Other